#pragma once
#include"Common.hpp"


class ThreadCache
{
public:
    void* Allocate(size_t size);
    void Deallocate(void* ptr,size_t size);
    void* FetchFromCentralCache(size_t index,size_t size);
    void ListToLong(FreeList& list,size_t size);
private:
    FreeList _freelist[NFREE_LIST];
};

static thread_local ThreadCache* pTLSThreadCache = nullptr;